package com.knoya.chejian.pda.util;

import android.content.Context;
import android.content.SharedPreferences;

import com.knoya.chejian.pda.Myapp;


/**
 * Created by Administrator on 2016/11/3 0003.
 * 作者：刘洋
 * SharedPreferences存储的工具类
 */
public class Sputil {
    //获得sp存储器
    public static SharedPreferences.Editor editor(String string){
        SharedPreferences preferences = Myapp.getContext().getSharedPreferences(
                string, Context.MODE_PRIVATE);
        SharedPreferences.Editor editor = preferences.edit();
        return editor;
    }
    //获得sp提取
    public static SharedPreferences sp(String string){
        SharedPreferences preferences = Myapp.getContext().getSharedPreferences(
                string, Context.MODE_PRIVATE);
        return preferences;
    }
}
